package com.shop.cereshop.app.dao.activity;

import com.shop.cereshop.app.page.canvas.CanvasCoupon;
import com.shop.cereshop.app.page.canvas.CanvasCouponDetail;
import com.shop.cereshop.app.page.product.ProductCoupon;
import com.shop.cereshop.app.param.canvas.CanvasCouponParam;
import com.shop.cereshop.commons.domain.activity.CerePlatformActivity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CerePlatformActivityDAO {
    int deleteByPrimaryKey(Long activityId);

    int insert(CerePlatformActivity record);

    int insertSelective(CerePlatformActivity record);

    CerePlatformActivity selectByPrimaryKey(Long activityId);

    int updateByPrimaryKeySelective(CerePlatformActivity record);

    int updateByPrimaryKey(CerePlatformActivity record);

    List<CanvasCoupon> getCoupons(CanvasCouponParam param);

    List<CanvasCouponDetail> findDetai(@Param("activityId") Long activityId);

    List<ProductCoupon> findCouponByProductId(@Param("productId") Long productId);

    List<ProductCoupon> findCouponByProductIdAndUserId(@Param("buyerUserId") Long buyerUserId, @Param("productId") Long productId);

    List<CanvasCoupon> getUserCoupons(CanvasCouponParam param);
}